;
define(function() {
	/**
	 * 点组件
	 */
	var MOPoint = function(x,y) {
		//全不等
		MOPoint.NOT_EQUAL = -1;
		//X相等
		MOPoint.X_EQUAL = 0;
		//Y相等
		MOPoint.Y_EQUAL = 1;
		//全相等
		MOPoint.ALL_EQUAL = 2;
		
		//x坐标
		this.x = x||0;
		
		//y坐标
		this.y = y||0;
		
		/**
		 * 设置X坐标
		 */
		this.setX = function(x){
			this.x = x;
			return this;
		};
		
		/**
		 * 获得X坐标
		 */
		this.getX = function(){
			return this.x;
		};
		
		/**
		 * 获得Y坐标
		 */
		this.getY = function(){
			return this.y;
		};
		
		/**
		 * 设置Y坐标
		 */
		this.setY = function(y){
			this.y = y;
			return this;
		};
		
		/**
		 * 比较两点是否相同
		 */
		this.equals = function(p){
			if(p instanceof MOPoint){
				return this.x == p.x && this.y == p.y;				
			}
			return false;
		};
		
		/**
		 * 细节比较点
		 */
		this.equalsPoint = function(p){
			if(p instanceof MOPoint){
				if(this.x == p.x && this.y == p.y){
					return MOPoint.ALL_EQUAL;
				}else if(this.x == p.x && this.y != p.y){
					return MOPoint.X_EQUAL;
				}else if(this.x != p.x && this.y == p.y){
					return MOPoint.Y_EQUAL;
				}else{
					return MOPoint.NOT_EQUAL;
				}
			}
		}
		
	};
	mofum.extend(MOPoint, Object);
	return MOPoint;
});